package com.wuhuahe.luanfeng.springboot.example;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created By wuhuahe
 * author:游龙
 * Date: 2018-07-23
 * Time: 9:04
 * Desc:
 */
@RestController
public class Example {

    @RequestMapping("/example1")
    public String example(){
        return "Welcome to Spring Boot! ~~~~Example!";
    }

    @GetMapping("/hello/{name}")
    public String sayHello(@PathVariable("name") String name){
        return "Hello " + name;
    }

    @GetMapping("/hello2/{name}")
    public String sayHello2(@PathVariable("name") String name){
        return "Hello " + name;
    }
}
